﻿<UserControl x:Class="NexTrackDesktop.Controls.PartyQueue"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:media="clr-namespace:NexTrackDesktop.Media"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="700">


    <Grid>

        <ListBox ItemsSource="{Binding Path=QueueItems}"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="90" />
                            <ColumnDefinition Width="250" />
                            <ColumnDefinition Width="70" />
                        </Grid.ColumnDefinitions>
                        
                        <!--Displays Album Art-->
                        <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10" 
                                Height="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
                                BorderBrush="Black" BorderThickness="1" CornerRadius="7"
                                Style="{StaticResource AlbumArtStyle}"/>

                        <!--Displayes Song Info-->
                        <Grid Grid.Column="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            
                            <TextBlock Grid.Row="0" Text="{Binding Song.Title}" Margin="0,10,0,0"/>
                            <TextBlock Grid.Row="1" Text="{Binding Song.Artist}" />
                            <TextBlock Grid.Row="2" Text="{Binding Song.Album}" />
                            
                        </Grid>
                        
                        
                        <!--Displays Votes -->
                        <Grid Grid.Column="2" >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="1*" />
                                <RowDefinition Height="1*" />
                            </Grid.RowDefinitions>

                            <Border Grid.Row="0" BorderBrush="Black" BorderThickness="1" VerticalAlignment="Center">
                                <Label Content="{Binding NetVotes}" FontWeight="Bold" FontSize="14"/>
                            </Border>
                        </Grid>
                        
                        </Grid>

                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        
        
        
    </Grid>
</UserControl>
